main: Fix a format string error
authorColin Walters <walters@verbum.org>
Thu, 28 Jun 2012 00:25:56 +0000 (20:25 -0400)
committerColin Walters <walters@verbum.org>
Thu, 28 Jun 2012 02:26:16 +0000 (22:26 -0400)
src/ostadmin/ot-admin-main.c
src/ostree/ot-main.c
src/switchroot/ostree-switch-root.c

index b416ec962b484b0cdf700945ee6277284a14f6f7..d4d1d5b5e56d9e7261b50c4bb0a149c4411ddb5e 100644 (file)
@@ -75,7 +75,7 @@ prep_builtin_argv (const char *builtin,
 static void
 set_error_print_usage (GError **error, OtAdminBuiltin *builtins, const char *msg, char **argv)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, msg);
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, msg);
   usage (argv, builtins, TRUE);
 }
 
index 789b22367b7ab17cc32e4d524177681d9e1a9802..d9e26010d60c8a436345f54670f07078a1885106 100644 (file)
@@ -75,7 +75,7 @@ prep_builtin_argv (const char *builtin,
 static void
 set_error_print_usage (GError **error, OstreeBuiltin *builtins, const char *msg, char **argv)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, msg);
+  g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, msg);
   usage (argv, builtins, TRUE);
 }
 
index c96ed3b41ed061d0c3af97a3f231482ecd7a5759..ff16b16536f1d64e30cd281196497e71e1ad5a4b 100644 (file)
@@ -203,11 +203,10 @@ main(int argc, char *argv[])
   for (i = 0; initramfs_move_mounts[i] != NULL; i++)
     {
       const char *path = initramfs_move_mounts[i];
-      snprintf (srcpath, sizeof(srcpath), path);
       snprintf (destpath, sizeof(destpath), "%s/ostree/%s%s", root_mountpoint, ostree_target, path);
-      if (mount (srcpath, destpath, NULL, MS_MOVE, NULL) < 0)
+      if (mount (path, destpath, NULL, MS_MOVE, NULL) < 0)
        {
-         perrorv ("failed to move mount of %s to %s", srcpath, destpath);
+         perrorv ("failed to move mount of %s to %s", path, destpath);
          exit (1);
        }
     }